Optimal. Leaf size=89 \[ -\frac{\left (a^2-b^2\right ) \cos (c+d x)}{a^3 d}+\frac{b \left (a^2-b^2\right ) \log (a \cos (c+d x)+b)}{a^4 d}-\frac{b \cos ^2(c+d x)}{2 a^2 d}+\frac{\cos ^3(c+d x)}{3 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15573, antiderivative size = 89, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {3872, 2837, 12, 772} \[ -\frac{\left (a^2-b^2\right ) \cos (c+d x)}{a^3 d}+\frac{b \left (a^2-b^2\right ) \log (a \cos (c+d x)+b)}{a^4 d}-\frac{b \cos ^2(c+d x)}{2 a^2 d}+\frac{\cos ^3(c+d x)}{3 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3872
Rule 2837
Rule 12
Rule 772
Rubi steps
\begin{align*} \int \frac{\sin ^3(c+d x)}{a+b \sec (c+d x)} \, dx &=-\int \frac{\cos (c+d x) \sin ^3(c+d x)}{-b-a \cos (c+d x)} \, dx\\ &=\frac{\operatorname{Subst}\left (\int \frac{x \left (a^2-x^2\right )}{a (-b+x)} \, dx,x,-a \cos (c+d x)\right )}{a^3 d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{x \left (a^2-x^2\right )}{-b+x} \, dx,x,-a \cos (c+d x)\right )}{a^4 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^2 \left (1-\frac{b^2}{a^2}\right )+\frac{-a^2 b+b^3}{b-x}-b x-x^2\right ) \, dx,x,-a \cos (c+d x)\right )}{a^4 d}\\ &=-\frac{\left (a^2-b^2\right ) \cos (c+d x)}{a^3 d}-\frac{b \cos ^2(c+d x)}{2 a^2 d}+\frac{\cos ^3(c+d x)}{3 a d}+\frac{b \left (a^2-b^2\right ) \log (b+a \cos (c+d x))}{a^4 d}\\ \end{align*}
Mathematica [A] time = 0.187618, size = 89, normalized size = 1. \[ \frac{\left (12 a b^2-9 a^3\right ) \cos (c+d x)-3 a^2 b \cos (2 (c+d x))+12 a^2 b \log (a \cos (c+d x)+b)+a^3 \cos (3 (c+d x))-12 b^3 \log (a \cos (c+d x)+b)}{12 a^4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.041, size = 106, normalized size = 1.2 \begin{align*}{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{3}}{3\,ad}}-{\frac{b \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{2\,{a}^{2}d}}-{\frac{\cos \left ( dx+c \right ) }{ad}}+{\frac{{b}^{2}\cos \left ( dx+c \right ) }{d{a}^{3}}}+{\frac{b\ln \left ( b+a\cos \left ( dx+c \right ) \right ) }{{a}^{2}d}}-{\frac{{b}^{3}\ln \left ( b+a\cos \left ( dx+c \right ) \right ) }{d{a}^{4}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.97901, size = 108, normalized size = 1.21 \begin{align*} \frac{\frac{2 \, a^{2} \cos \left (d x + c\right )^{3} - 3 \, a b \cos \left (d x + c\right )^{2} - 6 \,{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )}{a^{3}} + \frac{6 \,{\left (a^{2} b - b^{3}\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{4}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.80522, size = 181, normalized size = 2.03 \begin{align*} \frac{2 \, a^{3} \cos \left (d x + c\right )^{3} - 3 \, a^{2} b \cos \left (d x + c\right )^{2} - 6 \,{\left (a^{3} - a b^{2}\right )} \cos \left (d x + c\right ) + 6 \,{\left (a^{2} b - b^{3}\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{6 \, a^{4} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.30075, size = 138, normalized size = 1.55 \begin{align*} \frac{{\left (a^{2} b - b^{3}\right )} \log \left ({\left | -a \cos \left (d x + c\right ) - b \right |}\right )}{a^{4} d} + \frac{2 \, a^{2} d^{2} \cos \left (d x + c\right )^{3} - 3 \, a b d^{2} \cos \left (d x + c\right )^{2} - 6 \, a^{2} d^{2} \cos \left (d x + c\right ) + 6 \, b^{2} d^{2} \cos \left (d x + c\right )}{6 \, a^{3} d^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]